Hi Mike,
Not really. It depends on your system. It is fairly simple:
Set the plot to Time Domain
Increase the amplitude until you get significant encoder (red plot) activity.
But not so much that the Output (green) is going to extremes and saturating.
Finally if the position (red) doesn't seem to be following the (blue plot whatsoever) then reduce the frequency.
You might think about this like trying to shake a box to see what is inside (visualize a mass and a spring in the box), If you don't shake it hard enough to get anything inside to move then you won't get any information. While shaking too hard and causing the contents to bounce off the sides will confuse things as
well. Furthermore the frequency of the shaking should be such that you can feel the things inside the box moving. Too fast and the thing inside won't have time to even move. Too slow and everything will move together like a rigid solid. Usually 10 Hz is a good starting point and going less that 10Hz is usually not helpful.
Post plots of both Time Domain and Frequency domain.
HTH Regards TK
Group: DynoMotion |
Message: 6633 |
From: michaelthomasn |
Date: 2/2/2013 |
Subject: Re: Bode Plot Help |
Thanks....that goes a long way toward helping me understand.
I experimented with a filter that you had recommended to someone else, and it seemed to do a lot of good.
I will try some plots tomorrow as you have suggested.
Thanks alot,
Mike
--- In DynoMotion@yahoogroups.com, Tom Kerekes wrote:
>
> Hi Mike,
>
> Not really. It depends on your system. It is fairly simple:
>
> Set the plot to Time Domain
>
>
> Increase the amplitude until you get significant encoder (red plot) activity.Â
>
>
> But not so much that the Output (green) is going to extremes and saturating.
>
> Finally if the position (red) doesn't seem to be following the (blue plot whatsoever) then reduce the frequency.
>
> You might think about this like trying to shake a box to see what is inside (visualize a mass and a spring in the box), If you don't shake it hard enough to get anything inside to move then you won't get any information. While shaking too hard and causing the contents to bounce off the sides will confuse things as well. Furthermore the frequency of the shaking should be such that you can feel the things inside the box moving. Too fast and the thing inside won't have time to even move. Too slow and everything will move together like a rigid solid. Usually 10 Hz is a good starting point and going less that 10Hz is usually not helpful.
>
> Post plots of both Time Domain and Frequency domain.
>
>
> HTH
> Regards
> TK
>
>
>
>
> ________________________________
> From: michaelthomasn
> To: DynoMotion@yahoogroups.com
> Sent: Saturday, February 2, 2013 5:10 PM
> Subject: [DynoMotion] Bode Plot Help
>
>
> Â
> Hi Tom......Its evident that I can't extract any useful information from bode plots, or anything else related to motor tuning for that matter.
>
> Can you tell me what amplitude and cutoff frequency to try so I can get some useful plots that you may be able to decipher?
>
> Mike
>
|
|
Group: DynoMotion |
Message: 6634 |
From: michaelthomasn |
Date: 2/2/2013 |
Subject: Re: Bode Plot Help |
Tom,
I went back into the shop and ran the bode plots
They are in my michaelthomas file folder
One is titled freq 2213 and the other is time 2213
Mike
--- In DynoMotion@yahoogroups.com, "michaelthomasn" wrote:
>
>
> Thanks....that goes a long way toward helping me understand.
>
> I experimented with a filter that you had recommended to someone else, and it seemed to do a lot of good.
>
> I will try some plots tomorrow as you have suggested.
>
> Thanks alot,
>
> Mike
> --- In DynoMotion@yahoogroups.com, Tom Kerekes wrote:
> >
> > Hi Mike,
> >
> > Not really. It depends on your system. It is fairly simple:
> >
> > Set the plot to Time Domain
> >
> >
> > Increase the amplitude until you get significant encoder (red plot) activity.Â
> >
> >
> > But not so much that the Output (green) is going to extremes and saturating.
> >
> > Finally if the position (red) doesn't seem to be following the (blue plot whatsoever) then reduce the frequency.
> >
> > You might think about this like trying to shake a box to see what is inside (visualize a mass and a spring in the box), If you don't shake it hard enough to get anything inside to move then you won't get any information. While shaking too hard and causing the contents to bounce off the sides will confuse things as well. Furthermore the frequency of the shaking should be such that you can feel the things inside the box moving. Too fast and the thing inside won't have time to even move. Too slow and everything will move together like a rigid solid. Usually 10 Hz is a good starting point and going less that 10Hz is usually not helpful.
> >
> > Post plots of both Time Domain and Frequency domain.
> >
> >
> > HTH
> > Regards
> > TK
> >
> >
> >
> >
> > ________________________________
> > From: michaelthomasn
> > To: DynoMotion@yahoogroups.com
> > Sent: Saturday, February 2, 2013 5:10 PM
> > Subject: [DynoMotion] Bode Plot Help
> >
> >
> > Â
> > Hi Tom......Its evident that I can't extract any useful information from bode plots, or anything else related to motor tuning for that matter.
> >
> > Can you tell me what amplitude and cutoff frequency to try so I can get some useful plots that you may be able to decipher?
> >
> > Mike
> >
>
|
|
Group: DynoMotion |
Message: 6637 |
From: Tom Kerekes |
Date: 2/3/2013 |
Subject: Re: Bode Plot Help |
Hi Mike,
That looks like a good Bode Plot. The Save Data command only saves the raw frequency domain data so both files are actually the same and I could not see the time domain. It would have been better to have screen shots and also your settings and filters. So we are sort of working in the dark.
But basically that looks like a fairly well tuned system. I've attached a plot where I've marked the Band Width (gain crossover point) at about 40Hz. The phase at 40Hz is about -140 degrees. That gives a phase margin of 40 degrees which is fairly good. If the phase at the gain crossover frequency was -180 the system would be unstable. How far the phase is away from -180 is a measure of how stable your system is (phase margin).
That is what to look for in a Bode Plot: wherever the gain is 0db the phase should not be near -180 degrees. Otherwise the system acts like an inverter and combined with the negative feedback inverter becomes a overall loop gain of +1.0 and can have sustained oscillation at that frequency. Your plot only has 0db at one place but in general systems can have 0db at several places.
You can imagine what would happen if you simply increased the gains. The magnitude (blue) plot would shift upward while the phase (green) plot would remain the same. This would move the gain crossover point to the right. At a gain crossover of about 60Hz the phase would be at -180 and the system would go unstable.
To
try and improve the performance a little we can try to add a filter that will add positive phase at the crossover region. A lead/lag filter can be used to add positive phase at a particular place. However with servos you rarely get anything for free. A lead/lag filter has a negative effect of pushing up the magnitude of frequencies to the right of where the positive phase is applied. Right now your magnitude plot is well below 0db through all the high frequencies. A lead/lag filter will push those magnitudes upward. So a lead/lag filter that is too strong will result in high frequency oscillation.
I've
attached a Lead/Lag filter where the Lead kicks in at 35Hz and the Lag kicks in at 75Hz so the peak positive phase of 40 degrees is around 50Hz where we probably want it. It should only push your high frequency magnitudes up by about 12db which should not be enough to cause a problem. See the attached plot. I have set the P gain to 1.0 and I and D gains to zero and cleared all other filters. This allows you to see the plot of the Lead/Lag compensator all by itself. Notice that the magnitude is always positive so it will shift the band width higher - which to some extent is what we want - but it might be too much and make the system unstable. So you may well have to reduce the PID gains some to get a stable system. I would decrease them all by a factor of 2 to start with and see where things are.
HTH Regards TK
Group: DynoMotion |
Message: 6644 |
From: michaelthomasn |
Date: 2/3/2013 |
Subject: Re: Bode Plot Help |
Tom....that explanation of what to look for helped tremendously.
I applied the Pole Zero filter as you suggested. It gave me a phase margin of about 60.....which was up from 40. I played with the gains, then settled on about 90% of my original settings. With a 1" move (30,000 counts) at 90,000 counts velocity....I am able to hold position within 8 to 9 counts on all axis' at the worst areas. I have my max following error set at 33 counts, and have had no faults running programs so far. That seems really good to me.
My servos are a little whiney at idle....but it doesn't bother me too much. I set the deadband to 1 instead of zero....maybe I should go more?
All servos appear very stiff.
Thanks very much for the in depth explanation.
Mike
--- In DynoMotion@yahoogroups.com, Tom Kerekes wrote:
>
> Hi Mike,
>
> That looks like a good Bode Plot. The Save Data command only saves the raw frequency domain data so both files are actually the same and I could not see the time domain. It would have been better to have screen shots and also your settings and filters. So we are sort of working in the dark.
>
>
> But basically that looks like a fairly well tuned system. I've attached a plot where I've marked the Band Width (gain crossover point) at about 40Hz. The phase at 40Hz is about -140 degrees. That gives a phase margin of 40 degrees which is fairly good.  If the phase at the gain crossover frequency was -180 the system would be unstable. How far the phase is away from -180 is a measure of how stable your system is (phase margin).
>
> That is what to look for in a Bode Plot: wherever the gain is 0db the phase should not be near -180 degrees. Otherwise the system acts like an inverter and combined with the negative feedback inverter becomes a overall loop gain of +1.0 and can have sustained oscillation at that frequency. Your plot only has 0db at one place but in general systems can have 0db at several places.
>
>
> You can imagine what would happen if you simply increased the gains. The magnitude (blue) plot would shift upward while the phase (green) plot would remain the same. This would move the gain crossover point to the right. At a gain crossover of about 60Hz the phase would be at -180 and the system would go unstable.
>
> To try and improve the performance a little we can try to add a filter that will add positive phase at the crossover region. A lead/lag filter can be used to add positive phase at a particular place.  However with servos you rarely get anything for free. A lead/lag filter has a negative effect of pushing up the magnitude of frequencies to the right of where the positive phase is applied. Right now your magnitude plot is well below 0db through all the high frequencies.  A lead/lag filter will push those magnitudes upward. So a lead/lag filter that is too strong will result in high frequency oscillation.
>
> I've attached a Lead/Lag filter where the Lead kicks in at 35Hz and the Lag kicks in at 75Hz so the peak positive phase of 40 degrees is around 50Hz where we probably want it. It should only push your high frequency magnitudes up by about 12db which should not be enough to cause a problem. See the attached plot. I have set the P gain to 1.0 and I and D gains to zero and cleared all other filters. This allows you to see the plot of the Lead/Lag compensator all by itself. Notice that the magnitude is always positive so it will shift the band width higher - which to some extent is what we want - but it might be too much and make the system unstable. So you may well have to reduce the PID gains some to get a stable system. I would decrease them all by a factor of 2 to start with and see where things are.
>
>
> HTH
> Regards
> TK
>
>
>
> ________________________________
> From: michaelthomasn
> To: DynoMotion@yahoogroups.com
> Sent: Saturday, February 2, 2013 7:07 PM
> Subject: [DynoMotion] Re: Bode Plot Help
>
>
> Â
> Tom,
>
> I went back into the shop and ran the bode plots
> They are in my michaelthomas file folder
>
> One is titled freq 2213 and the other is time 2213
>
> Mike
>
> --- In DynoMotion@yahoogroups.com, "michaelthomasn" wrote:
> >
> >
> > Thanks....that goes a long way toward helping me understand.
> >
> > I experimented with a filter that you had recommended to someone else, and it seemed to do a lot of good.
> >
> > I will try some plots tomorrow as you have suggested.
> >
> > Thanks alot,
> >
> > Mike
> > --- In DynoMotion@yahoogroups.com, Tom Kerekes wrote:
> > >
> > > Hi Mike,
> > >
> > > Not really.ÃÂ It depends on your system.ÃÂ It is fairly simple:
> > >
> > > Set the plot to Time Domain
> > >
> > >
> > > Increase the amplitude until you get significant encoder (red plot) activity.ÃÂ
> > >
> > >
> > > But not so much that the Output (green) is going to extremes and saturating.
> > >
> > > Finally if the position (red) doesn't seem to be following the (blue plot whatsoever) then reduce the frequency.
> > >
> > > You might think about this like trying to shake a box to see what is inside (visualize a mass and a spring in the box),ÃÂ If you don't shake it hard enough to get anything inside to move then you won't get any information.ÃÂ While shaking too hard and causing the contents to bounce off the sides will confuse things as well.ÃÂ Furthermore the frequency of the shaking should be such that you can feel the things inside the box moving.ÃÂ Too fast and the thing inside won't have time to even move.ÃÂ Too slow and everything will move together like a rigid solid.ÃÂ Usually 10 Hz is a good starting point and going less that 10Hz is usually not helpful.
> > >
> > > Post plots of both Time Domain and Frequency domain.
> > >
> > >
> > > HTH
> > > Regards
> > > TK
> > >
> > >
> > >
> > >
> > > ________________________________
> > > From: michaelthomasn
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Saturday, February 2, 2013 5:10 PM
> > > Subject: [DynoMotion] Bode Plot Help
> > >
> > >
> > > ÃÂ
> > > Hi Tom......Its evident that I can't extract any useful information from bode plots, or anything else related to motor tuning for that matter.
> > >
> > > Can you tell me what amplitude and cutoff frequency to try so I can get some useful plots that you may be able to decipher?
> > >
> > > Mike
> > >
> >
>
|
|
| | | |